package com.chezhujie.www.service;

import java.util.List;
import java.util.Map;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.chezhujie.www.domain.Czjactdetail;
import com.chezhujie.www.persistence.CzjactdetailMapper;
import com.chezhujie.www.utils.UUIDUtils;


/**
 * Created by 汤伟杰 on 2017/5/23.
 */
@Service
public class CzjactdetailService {
	
	@Autowired
	private CzjactdetailMapper czjactdetailMapper;

	public void insertCzjactdetail(Czjactdetail czjactdetail) {

		if(StringUtils.isBlank(czjactdetail.getActDetaiId())){
			czjactdetail.setActDetaiId(UUIDUtils.getUUID());
	}
			czjactdetailMapper.insertCzjactdetail(czjactdetail);
	}

	public List<Integer> getPays() {
		return czjactdetailMapper.getPays();
	}

    public List<Czjactdetail> getListBy(Map<String, Object> param)  {
		return czjactdetailMapper.getListBy(param);
	}

	public void deleteByIds(List<String> listActdetailId) {
		czjactdetailMapper.deleteByIds(listActdetailId);
	}

	public void saves(List<Czjactdetail> listActdetail) {
		czjactdetailMapper.saves(listActdetail);
	}

	public Czjactdetail getListByActNum(String activityNum) {
		// TODO Auto-generated method stub
		return null;
	}
}
